import { create } from 'zustand'

export const useThemeStore = create((set) => ({
  mode: 'dark',
  switchMode: () => set((state) => ({ mode: state.mode === 'dark' ? 'light' : 'dark' })),
}))

export const useUserStore = create((set) => ({
  user: null,
  setUser: (user) => set({ user }),
  clearUser: () => set({ user: null })
}))